<template>
	<public-view navType="other" :navTitle="title">
		<view class="content">
			<view class="item-box flex f-d-c">
				<view class="form-box flex a-i-c j-c-b">
					<view class="title f-s-28upx">
						职位
					</view>
					<view class="info flex a-i-c">
						<view class="text f-s-30" style="color: #1857D6;width: 300rpx;">
							{{item.name||""}}
						</view>
						<view class="tip-box all-center color-2567F3 f-s-24">
							驾龄{{item.age||0}}年
						</view>
					</view>
				</view>
				<view class="form-box flex a-i-c j-c-b">
					<view class="title f-s-28upx">
						性别
					</view>
					<view class="info flex a-i-c">
						<view class="text f-s-30" style="color: #1857D6;">
							{{item.sex ===1?'男':'女'}}
						</view>
					</view>
				</view>
				<view class="form-box flex a-i-c j-c-b">
					<view class="title f-s-28upx">
						工作地点
					</view>
					<view class="info flex a-i-c">
						<view class="text f-s-30">
							{{(item.work_province_text||"")+(item.work_city_text||"")+(item.work_area_text||"")+(item.work_address_desc||"")}}
						</view>
					</view>
				</view>
				<view class="form-box flex a-i-c j-c-b">
					<view class="title f-s-28upx">
						薪资
					</view>
					<view class="info flex a-i-c">
						<view class="text f-s-30" style="color: #EA3232;">
							{{item.first_salary||0}}-{{item.last_salary||0}}k
						</view>
					</view>
				</view>
			</view>
			<view class="item-box flex f-d-c">
				<view class="form-box flex j-c-b">
					<view class="title f-s-28upx">
						<block v-if="item.type == '1'">
							自我介绍
						</block>
						<block v-else>工作内容</block>
					</view>
					<view class="info flex a-i-c">
						<view class="text f-s-30">
							{{item.content||""}}
						</view>
					</view>
				</view>
			</view>
			<view class="item-box flex f-d-c" v-if="item.type == '1'">
				<view class="form-box flex j-c-b">
					<view class="title f-s-28upx">
						相关证件
					</view>
				</view>
				<view class="form-box flex f-w-w after j-c-b">
					<block v-for="(item, index) in item.images" :key="index">
						<image class="image" :src="item" mode=""></image>
					</block>
				</view>
			</view>
			<view class="bottombtn-box flex a-i-c j-c-a" @click="$callPhone(item.mobile)">
				<view class="service-btn all-center color-fff f-s-30 f-w-b w-100">
					<image class="icon" src="@/static/images/white-phone-icon.svg" mode=""></image>
					联系客户
					<view class="bottomflur">
						
					</view>
				</view>
			</view>
		</view>
	</public-view>
</template>

<script>
	export default {
		data() {
			return {
				item:{},
				title:"",
				work_id:""
			};
		},
		onLoad(e) {
			console.log(e)
			this.work_id = e.id
			this.getCarInfo()
		},
		onShow() {
		},
		methods:{
			getCarInfo(){
				let that = this
				that.util.getRequest({
					url:"v1/content/work_edit",
					data:{
						id:that.work_id
					}
				}).then(res=>{
					console.log(res)
					that.item = res.data
					that.title = that.item.type == '1'?"找工作":'招聘'
				}).catch(e=>{
					uni.showToast({
						title:"参数错误",
						icon:"none"
					})
				})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.service-btn{
		background: linear-gradient(180deg, #0E98E8 0%, #2466F2 100%);
		border-radius: 128upx;
		position: relative;
		width: 702upx;
		height: 96upx;
		.icon{
			width: 46upx;
			height: 44upx;
			margin-right: 18upx;
		}
		.bottomflur{
			background: #2567F3;
			filter: blur(24px);
			border-radius: 108px;
			width: 178upx;
			height: 28upx;
			bottom: 0;
			position: absolute;
		}
	}
	.item-box{
		width: 100%;
		padding: 38upx 42upx;
		background: #FFFFFF;
		border-radius: 24upx;
		margin-bottom: 28upx;
		.after{
			&::after{
				width: 200upx;
				content: "";
			}
		}
		.form-box{
			width: 100%;
			margin-bottom: 42upx;
			.image{
				width: 200upx;
				height: 200upx;
				margin-bottom: 16upx;
				background: #EFEFEF;
			}
			.info{
				flex: 1;
				.text{
					margin-right: 20upx;
					line-height: 44upx;
				}
				.tip-box{
					min-width: 114upx;
					height: 42upx;
					border: 1upx solid #2567F3;
					border-radius: 4upx;
					padding: 4upx 14upx;
				}
			}
			.title{
				width: 120upx;
				color: #9C9C9C;
				margin-right: 40upx;
				white-space: nowrap;
				line-height: 44upx;
			}
		}
	}
	.bottom-l{
		height: 180upx;
	}
	.bottombtn-box{
		position: fixed;
		bottom: 0;
		height: 160upx;
		width: 750upx;
		left: 0;
		.item-phone{
			
		}
	}
	.content{
		width: 750upx;
		padding: 32upx 24upx;
	}
</style>
